//
//  SecondDetailViewController.m
//  Protect -A
//
//  Created by 付剑英 on 16/6/22.
//  Copyright © 2016年 付剑英. All rights reserved.
//

#import "SecondDetailViewController.h"

@interface SecondDetailViewController ()<UIWebViewDelegate>
@property (nonatomic,retain)UIWebView *wv;//webView；
@end

@implementation SecondDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self create];
    self.navigationItem.title = @"礼遇详情";
    // Do any additional setup after loading the view.
}
#pragma mark - ------------ 创建WebView ---------------

-(void)create{
 
    //UIWebView 加载网络数据 直接适配屏幕
    self.wv = [[UIWebView alloc]initWithFrame:CGRectMake(0, -50, self.view.frame.size.width, self.view.frame.size.height + 50)];
    self.wv.delegate = self;
    //自动对页面进行缩放，以适应屏幕
    _wv.scalesPageToFit = YES;
    //用户交互
    _wv.userInteractionEnabled = YES;
    //加载网址
    NSString *html = [NSString stringWithFormat:@"https://enjoy.ricebook.com/product/%@",_DetailID];
    [_wv loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:html]]];
    
    [self.view addSubview:_wv];


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
